package com.qf.user.controller;


import com.qf.common.R;

import com.qf.entity.AdminUser;
import com.qf.user.service.AdminUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Daniel
 * @since 2021-10-12
 */
@RestController
@RequestMapping("/bank_service/admin-user2")
public class AdminUserController {

    //注入service
    @Autowired
    private AdminUserService adminUserService;


    //controller调service service调mapper（mp帮我们做了service继承了mp中的方法）
    /*查询所有用户*/
    @ApiOperation(value = "所有管理员用户")
    @GetMapping("findAll2")
    public R findAllTeacher() {
        List<AdminUser> list = adminUserService.list(null);
        return R.ok().data("items", list);
    }


}

